/*
 * Video.h
 *
 *  Created on: Sep 4, 2011
 *      Author: Patrick
 */

#ifndef VIDEO_H_
#define VIDEO_H_

#include <windows.h>
#include <GL/glew.h>
#include <SDL/SDL.h>
#include <vlc/vlc.h>

struct MCSDLVideoContext {
		SDL_Surface *surface;
		SDL_mutex *mutex;
};

/*
 * Playback management (SDL, etc.)
 */

void MCVideoCreate(char* mediaPath, int width, int height);
GLuint MCVideoStreamTexture(GLuint texture);
void *MCSDLVideoLock(void *data, void **p_pixels);
void MCSDLVideoUnlock(void *data, void *id, void * const *p_pixels);
void MCSDLVideoDisplay(void *data, void *id);
void MCVideoDestroy();

/*
 * Playback control
 */

void MCVideoPlay();
void MCVideoPause();
int MCVideoIsPlaying();
float MCVideoGetDuration();
float MCVideoGetPosition();
void MCVideoSetPosition(float position);

#endif /* VIDEO_H_ */
